﻿<Window 
	x:Class="EyeSoft.Wpf.Facilities.Demo.EditCustomer"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:viewModels="clr-namespace:EyeSoft.Wpf.Facilities.Demo.ViewModels;assembly=EyeSoft.Wpf.Facilities.Demo.ViewModels"
	mc:Ignorable="d"
	d:DataContext="{d:DesignInstance Type=viewModels:EditCustomerViewModel, IsDesignTimeCreatable=False}"
	Title="EyeSoft - Magic WPF - Customer"
	Height="250"
	Width="425"
	WindowStartupLocation="CenterScreen"
	ShowInTaskbar="False">
	<Grid Margin="20">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="60" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="30" />
			<RowDefinition Height="30" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<TextBlock Text="First name" VerticalAlignment="Center" />
		<TextBox Grid.Column="1" Text="{Binding Customer.FirstName,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}" Width="200" />
		<TextBlock Grid.Row="1" Text="Last name" VerticalAlignment="Center" />
		<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Customer.LastName,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}" Width="200" />
		<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
			<Button
				Command="{Binding ConfirmCommand}"
				VerticalAlignment="Bottom"
				HorizontalAlignment="Right"
				Width="50"
				Height="30"
				Content="OK"
				Margin="0,0,10,0"
			/>
			<Button
				Command="{Binding CancelCommand}"
				VerticalAlignment="Bottom"
				HorizontalAlignment="Right"
				Width="50"
				Height="30"
				Content="Cancel"
			/>
		</StackPanel>
	</Grid>
</Window>